<script type="text/javascript">
query_resignation();
function query_resignation(){
	sys_loading();
	var page = sys_fill_parm('queryResignationForm');
	var parm = $('#queryResignationForm').serialize() + (page != null ? ('&page=' + page) : '');
	var url = create_url('resignationRecord-query');
	sys_record_parm('resignationRecord',parm);
	$.ajax({type:'POST', url:url, data:parm,
		success: function(result) {
			sys_loading_close();
			$('#resignationList').html(result);
		}
	});
}
function quit_resignation(code, un) {
	$.Zebra_Dialog('确认 ' + un + ' 已离职吗？',{
	'type': 'question','title': '警告','buttons':[
	       {caption:'确认',callback:function() {
	    	   var url = create_url('resignationRecord-quit');
	    	   aidExecuteResignation_resignation(code, url);
			}},
	       {caption:'取消',callback:function(){}
		}]
	});
}

function aidExecuteResignation_resignation(code, url) {
	var parm = {'code':code};
	sys_submiting();
	$.ajax({type:'POST', url:url, data:parm,
		success: function(result) {
			sys_submiting_close();
			if ('success' == result) {
				sys_msg('操作成功!');
				query_resignation();
			} else {
				sys_warning('操作失败', '操作失败，请刷新页面再次尝试，如果问题依然存在，请联系管理员!');
			}
		}
	});
}
</script>
<#import "/freemarker/modeltype.ftl" as mt>
<form id="queryResignationForm">
<table class="search_term_table">
	<tr><th style="width:80px;">离职原因</th>
		<td><input class="form-control" type="text" name="reason" style="width:150px;"/></td>
		<th style="width:80px;">离职人员</th>
		<td><input class="form-control" type="text" name="un" style="width:100px;"/></td>
		<td style="text-align:right;">
		<button class="btn btn-info" onclick="javascript:query_resignation(); return false;"><i class="icon-search"></i> 查 询 </button>
		</td>
	</tr>
	<tr><th style="width: 80px;">离职时间</th>
		<td>
			<input id="start" type="text" style="width:80px;" name="start" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'});">
			至  
			<input id="end" type="text" style="width:80px;" name="end" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'});">
		</td>
		<th style="width: 80px;">是否屏蔽</th>
		<td><@mt.YesOrNo r=true name='deleted' d=false mc=true /></td>
	</tr>
</table>
</form>
<div id="resignationList"></div>
